package cc.mycraft.events;

import java.util.Date;

import org.bukkit.event.Event;
import org.bukkit.event.HandlerList;

import cc.mycraft.EventLoader;
import cc.mycraft.MYCPlugin;

public final class MYCPluginLoadEvent extends Event {
	
	private static final HandlerList handlers = new HandlerList();

	@Override
	public HandlerList getHandlers() {
		return handlers;
	}
	
	public static HandlerList getHandlerList() {
		return handlers;
	}
	
	private boolean isReload;
	private long time;
	private MYCPlugin PG;
	
	public MYCPluginLoadEvent(MYCPlugin p) {
		this.PG = p;
		this.time = new Date().getTime();
		this.isReload = this.time-EventLoader.startTime > 60000l;
	}
	
	public boolean isReload() {
		return this.isReload;
	}
	
	public MYCPlugin getPlugin() {
		return this.PG;
	}
}
